using System;
using Core;
using Sirenix.OdinInspector;
using UnityEngine;

namespace g_gongjianta
{
    [CreateAssetMenu(menuName = "Mini/g_gongjianta/Conf/TblDungeon")]
    public class TblDungeon : AbstractSOTable<int, TblDungeon.Conf>
    {
        [Serializable]
        public class Conf : ITableConf<int>
        {
            public int Index => Id;

            [HorizontalGroup("row0")]
            public int Id;

            [HorizontalGroup("row0")]
            public string Name;

            [LabelText("城墙：")]
            public WallConf[] Walls;

            [LabelText("怪物巢穴：")]
            public LairConf[] Lairs;

            public void Awake() { }
        }

        [Serializable]
        public class WallConf
        {
            [HorizontalGroup("row0")]
            public int Id;

            [HorizontalGroup("row0")]
            public float PosX;

            [HorizontalGroup("row0")]
            public float Height;

            [HorizontalGroup("row0")]
            public int AnchorID;

            [HorizontalGroup("row0")]
            public string BtnCode;
        }

        [Serializable]
        public class LairConf
        {
            [HorizontalGroup("row0")]
            public int Id;

            [HorizontalGroup("row0")]
            [LabelText("延迟时间（秒）：")]
            public int DelayTime;

            [HorizontalGroup("row0")]
            public Vector2 Pos;

            [HorizontalGroup("row0")]
            public float Interval;

            [HorizontalGroup("row0")]
            public int Count;

            [HorizontalGroup("row0")]
            public int MonsterID;
        }
    }
}